<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <table id="userTable">
        <tr>
            <td>名字</td>
            <td>家乡</td>
            <td>工作城市</td>
            <td>工作</td>
            <td>格言</td>
        </tr>
    </table>
    <script>
        // 如何把对象显示到页面上
        const person = {
            name:'张三',
            hometown:'丰城',
            city:'南昌',
            job:'web developer',
            bio:'吃货'
        }
        // DOM html 标签
            // js通向html世界的编程 DOM
        const tableElement = document.querySelector('#userTable');
        tableElement.innerHTML += `
        <tr>
            <td>${person.name}</td>
            <td>${person.hometown}</td>
            <td>${person.city}</td>
            <td>${person.job}</td>
            <td>${person.bio}</td>
        </tr>
        `;
        
    </script>
</body>
</html>